﻿<%@ Page Language="C#" MasterPageFile="~/MasterPages/MasterPage.master" AutoEventWireup="true" CodeFile="DirectionList.aspx.cs" Inherits="Patient_DirectionList" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" Runat="Server">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
СПИСЪК НА ИЗДАДЕНИТЕ НАПРАВЛЕНИЯ<br />
&nbsp;<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="DirectionID" DataSourceID="sdsDirections" 
        onselectedindexchanged="GridView1_SelectedIndexChanged">
        <Columns>
            <asp:BoundField DataField="ЕГН" HeaderText="ЕГН" SortExpression="ЕГН" />
            <asp:BoundField DataField="Име" HeaderText="Име" SortExpression="Име" />
            <asp:BoundField DataField="Фамилия" HeaderText="Фамилия" 
                SortExpression="Фамилия" />
            <asp:BoundField DataField="КОД" HeaderText="КОД" 
                SortExpression="КОД" />
            <asp:BoundField DataField="Има" HeaderText="Има" SortExpression="Има" />
            <asp:BoundField DataField="Фамилия1" HeaderText="Фамилия1" 
                SortExpression="Фамилия1" />
            <asp:BoundField DataField="Кабинет №" HeaderText="Кабинет №" 
                SortExpression="Кабинет №" />
            <asp:BoundField DataField="Тел." HeaderText="Тел." 
                SortExpression="Тел." />
            <asp:BoundField DataField="Дата на Направлението" 
                HeaderText="Дата на Направлението" SortExpression="Дата на Направлението" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="sdsDirections" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ClinicConnectionString %>" 
        SelectCommand="SELECT Direction.DirectionID, Patients.EGN AS ЕГН, Patients.Name AS Име, Patients.LastName AS Фамилия, Doctors.Code AS КОД, Doctors.FirstName AS Има, Doctors.LastName AS Фамилия, Doctors.Room AS [Кабинет №], Doctors.Phone AS [Тел.], Direction.Date AS [Дата на Направлението] FROM Doctors INNER JOIN Direction ON Doctors.DoctorID = Direction.DoctorID INNER JOIN Patients ON Direction.PatientID = Patients.PatientID">
    </asp:SqlDataSource>
</asp:Content>

